# coding:utf-8
from django.db import models
from django.conf import settings

# 引入Article Model
from primary_blog.models import Article


# Create your models here.


class Comment(models.Model):
    user = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name=u'用户')
    article = models.ForeignKey(Article, verbose_name=u'文章')
    comment = models.TextField(verbose_name=u'评论内容')
    create_time = models.DateTimeField(u'创建时间', auto_now_add=True)

    class Meta:
        verbose_name_plural = verbose_name = u'评论'
        ordering = ['-create_time']
